pkg_name=xkeyboard-config
version=2.14
build_dir=$builds_dir_root/$pkg_name-$version
src_dir=$src_dir_root/$pkg_name-$version
url=http://www.x.org/releases/individual/data/$pkg_name/$pkg_name-$version.tar.bz2

cd "$src_dir_root"
rm -Rf "$pkg_name-$version"
tar jxf "$pkg_name-$version.tar.bz2"

rm -Rf "$build_dir"
mkdir -p "$build_dir"
cd "$build_dir"

export CFLAGS=-O0
#perl usual shit
export INTLTOOL_PERL=/libexec/intltool-perl/bin/perl
"$src_dir/configure"		\
	--prefix=/		\
	--disable-nls		\
	--without-xsltproc	\
	--disable-compat-rules	\
	--disable-rpath		\
	--enable-runtime-deps	\
	--with-gnu-ld
unset PERL
unset CFLAGS

#more perl shit
OLD_PATH=$PATH
export PATH=/libexec/intltool-perl/bin:$PATH

make

if test -z "$OLD_PATH"; then
    unset PATH
else
    export PATH=$OLD_PATH
fi

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "DESTDIR=$install_tmp_dir"

install_dirs "$builders_dir_root/$pkg_name/runtime.dirs"
install_files "$builders_dir_root/$pkg_name/runtime.files" "$install_tmp_dir"

rm -Rf "$install_tmp_dir"
rm -Rf "$build_dir"
rm -Rf "$src_dir"
